package home.actions.main;

import home.actions.base.BaseAction;
import home.beans.Note;
import home.db.NoteDAO;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * Created by Administrator on 2015/12/10.
 */
public class IndexAction extends BaseAction {

    public String execute(HttpServletRequest req, HttpServletResponse resp) throws Exception {
        List<Note> data = NoteDAO.getNotes();
        req.setAttribute("data", data);
        return "toListPage";
    }
}
